#!/usr/bin/perl
#Programmer: Rory Carmichael
#Purpose: Wrapper script to align the groups extracted by orthomcl
#Usage: aligngroups.pl <groudir> <alignmentdir>

my $groupdir = shift;
my $alndir = shift;

mkdir $alndir;
foreach my $file (`ls $groupdir`) {
	chomp $file;
	print `muscle -in $groupdir/$file -out $alndir/$file.fasta`;
}
